<template>
  <div id="app">
      <router-link to="/login" tag="button" replace>登录</router-link>
      <router-link to="/home" tag="button" replace>主页面</router-link>
      <router-link to="/user" tag="button">展示用户信息</router-link>
      <button @click="pushShow()">push</button>
      <button @click="pushPlace()">主页面</button>
      <keep-alive include="VueViewHomeIndex,VueTest04My">
        <router-view></router-view>
      </keep-alive>
  </div>
</template>

<script>
export default{
  data(){
    return{

    }
  },
  methods:{
    pushShow(){
      this.$router.push({
        name:'My',
        params:{
          id:'1',name:'小黑'
        }
      })
    },
    pushPlace(m){
      this.$router.replace(m)
    }
  }
}
</script>

